<?php /* Smarty version 2.6.19, created on 2008-09-22 15:52:15
         compiled from ./admin/add-post.tpl */ ?>
<form action="post.php?f=<?php echo $this->_tpl_vars['f']; ?>
&id=<?php echo $this->_tpl_vars['id']; ?>
" method="POST">
<table>
	<tr>
		<td>title</td><td><input type="text" name="title" value="<?php echo $this->_tpl_vars['post_info']['title']; ?>
"/></td>
	</tr>
	<tr>
		<td>content</td><td><input type="textarea" name="content" value="<?php echo $this->_tpl_vars['post_info']['content']; ?>
"/>  </td>
	</tr>	
	<tr>
		<td>catalog</td>
		<td>
		<select name="catalog" >
		<?php unset($this->_sections['catalog']);
$this->_sections['catalog']['name'] = 'catalog';
$this->_sections['catalog']['loop'] = is_array($_loop=$this->_tpl_vars['catalogs_list']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['catalog']['show'] = true;
$this->_sections['catalog']['max'] = $this->_sections['catalog']['loop'];
$this->_sections['catalog']['step'] = 1;
$this->_sections['catalog']['start'] = $this->_sections['catalog']['step'] > 0 ? 0 : $this->_sections['catalog']['loop']-1;
if ($this->_sections['catalog']['show']) {
    $this->_sections['catalog']['total'] = $this->_sections['catalog']['loop'];
    if ($this->_sections['catalog']['total'] == 0)
        $this->_sections['catalog']['show'] = false;
} else
    $this->_sections['catalog']['total'] = 0;
if ($this->_sections['catalog']['show']):

            for ($this->_sections['catalog']['index'] = $this->_sections['catalog']['start'], $this->_sections['catalog']['iteration'] = 1;
                 $this->_sections['catalog']['iteration'] <= $this->_sections['catalog']['total'];
                 $this->_sections['catalog']['index'] += $this->_sections['catalog']['step'], $this->_sections['catalog']['iteration']++):
$this->_sections['catalog']['rownum'] = $this->_sections['catalog']['iteration'];
$this->_sections['catalog']['index_prev'] = $this->_sections['catalog']['index'] - $this->_sections['catalog']['step'];
$this->_sections['catalog']['index_next'] = $this->_sections['catalog']['index'] + $this->_sections['catalog']['step'];
$this->_sections['catalog']['first']      = ($this->_sections['catalog']['iteration'] == 1);
$this->_sections['catalog']['last']       = ($this->_sections['catalog']['iteration'] == $this->_sections['catalog']['total']);
?>		
		<?php if ($this->_tpl_vars['catalogs_list']['id'] == $this->_tpl_vars['post_info']['catalog']['id']): ?>
		<option value="<?php echo $this->_tpl_vars['catalogs_list'][$this->_sections['catalog']['index']]['id']; ?>
" selected="selected"><?php echo $this->_tpl_vars['catalogs_list'][$this->_sections['catalog']['index']]['catalog_name']; ?>
</option>
		<?php else: ?>
		<option value="<?php echo $this->_tpl_vars['catalogs_list'][$this->_sections['catalog']['index']]['id']; ?>
"><?php echo $this->_tpl_vars['catalogs_list'][$this->_sections['catalog']['index']]['catalog_name']; ?>
</option>
		<?php endif; ?>
		<?php endfor; endif; ?>
		</select></td>
	</tr>
	<tr>
	<td><input type="submit" name="submit" value="OK"/>  <input type="hidden" name="OP" value="submit"/>  
	
	</td></tr>
</table>
</form>